//
//  TgModel.m
//  1.Tg
//
//  Created by mac on 16/5/30.
//  Copyright © 2016年 wxhl. All rights reserved.
//

#import "TgModel.h"

@implementation TgModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
      if (self = [super init]) {
            [self setValuesForKeysWithDictionary:dict];
      }
      return self;
}

+ (instancetype)tgWithDict:(NSDictionary *)dict
{
      return [[self alloc]initWithDict:dict];
}

+ (NSArray *)tgs
{
      NSArray *array = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"tgs.plist" ofType:nil]];
      
      NSMutableArray *arrayM = [NSMutableArray array];
      for (NSDictionary *dic in array) {
//            TgModel *model = [TgModel tgWithDict:dic];
            [arrayM addObject:[self tgWithDict:dic]];
      }
      return arrayM;
}

@end
